﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Xml;

namespace Pampa.CRUD.Core
{
    public interface IEntityRepository
    {
        ITransaction BeginTransaction(object entity);

        bool IsNew(object entity);

        void Save(object entity);

        void Delete(object entity);

        void Reload(object entity);

        object Find(Type entityType, object id);

        string GetId(object entity);

        object ParseId(Type entityType, string strId);

        IList GetList(string entityQualifiedName);

        IList GetList(string entityQualifiedName, string orderBy);

        IList GetList(string entityQualifiedName, string property, string strPropertyValue);

        IList GetList(string entityQualifiedName, string property, string strPropertyValue, string orderBy);

        IList GetList(string entityQualifiedName, string likeProperty, string likeValue, int maxresults);

        IList GetList(string entityQualifiedName, string likeProperty, string likeValue, int maxresults, string filterProperty, string strFilterPropertyValue);

        bool IsEntity(Type type);
    }
}
